package com.cn.wanxi.dao.impl;


import com.cn.wanxi.dao.BaseDao;
import com.cn.wanxi.util.JDBC;

import java.util.List;
import java.util.Map;

/**
 * 作者：Administrator
 * 时间:2020/2/4 0004    23:04
 * 描述：
 */
public class CookStyleImpl implements BaseDao {
    @Override
    public List<Map> getList(Object object) {

        return JDBC.excuteQuery("select * from cookstyle " + object, null);
    }

    @Override
    public Object getModel(Object object) {
        return null;
    }

    @Override
    public int add(Object object) {
        return JDBC.executeUpdate("insert into cookstyle(name,content) values(?,?)", object);
    }

    @Override
    public int update(Object object) {
        return JDBC.executeUpdate("update cookstyle set name = ?,content = ? where id = ?", object);
    }

    @Override
    public int delete(Object object) {
        return JDBC.executeUpdate("delete from cookstyle where id=?", object);
    }

    @Override
    public List<Map> getDataNum(Object object) {
        return null;
    }
}
